package com.smarthospital.service;

import com.smarthospital.service.impl.LuoHUReportGeterImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.concurrent.ConcurrentHashMap;

/**
 * create by sym  2021/6/19 14:01.
 */
@Component
public class ReportGetetContext {

    private ConcurrentHashMap<String,ReportGeter> reportGeters = new ConcurrentHashMap<>(5);

    @Autowired
    private LuoHUReportGeterImpl luoHUReportGeter;
    public ReportGeter getReportGeter(String hospital){
        return reportGeters.get(hospital);
    }

    @PostConstruct
    void init (){
        reportGeters.put("luohu", luoHUReportGeter);
    }

}
